﻿Imports Microsoft.VisualBasic
Imports System.Data

Public Class clsLinea
    Inherits clsDatos

    Dim strSQL As String

    Private m_strlinea As String
    Public Property linea() As String
        Get
            Return m_strlinea
        End Get
        Set(ByVal value As String)
            m_strlinea = value
        End Set
    End Property

    Function Get_Lineas() As DataTable

        'Return GetDatos("select distinct linea from art where estatus='ALTA' order by linea")
        Return GetDatos("select * from artlinea' order by linea")

    End Function

    Function Do_BuscaLineas(ByVal strLinea As String) As DataTable

        'Return GetDatos("select linea from art where estatus='ALTA' and linea='" & strLinea & "' order by linea")
        Return GetDatos("select linea from artlinea where linea='" & strLinea & "' order by linea")

    End Function

    Function DoInsert() As Boolean

        If Do_ExecuteNonQuery("Insert into artlinea (linea) values ('" & Me.linea & "')") > 0 Then
            Return True
        Else
            Return False
        End If

    End Function

End Class
